/**
 * 
 */
package adnotatio.rdf;

/**
 * @author kotelnikov
 */
public class Literal extends PropertyValue {

    /**
     * 
     */
    private static final long serialVersionUID = 3481808452927316435L;

    private Object fValue;

    /**
     * @param value
     */
    protected Literal(Model model, Object value) {
        super(model);
        fValue = value;
    }

    /**
     * @see adnotatio.rdf.PropertyValue#accept(adnotatio.rdf.IValueVisitor)
     */
    public void accept(IValueVisitor visitor) {
        visitor.visit(this);
    }

    /**
     * @see adnotatio.rdf.Entity#getStringValue()
     */
    protected String getStringValue() {
        return fValue != null ? fValue.toString() : "";
    }

    /**
     * @see adnotatio.rdf.PropertyValue#getValue()
     */
    public Object getValue() {
        return fValue;
    }

}
